import request from "@/API/request";

// 用户相关接口
const video = {
  getVideoList: (data) => request({ url: "/static/data.json", data }),
  getVideoComments: (data) =>
    request({ url: "/static/data/comments.json", data }),
  // 登录
  login: (data) =>
    request({
      url: "/user/login",
      method: "POST",
      data,
    }),

  // 注册
  register: (data) =>
    request({
      url: "/user/register",
      method: "POST",
      data,
    }),

  // 获取用户信息
  getInfo: (data) =>
    request({
      url: "/user/info",
      data,
    }),

  // 更新用户信息
  updateInfo: (data) =>
    request({
      url: "/user/update",
      method: "POST",
      data,
    }),
};

export default video;
